package com.example.mall_system.entity;

public class LoginResponse {
    private Long id;
    private String username;
    private Integer role; // 将角色类型改为Integer
    private String token;

    // 修改构造函数以接受Integer类型的role参数
    public LoginResponse(Long id, String username, Integer role, String token) {
        this.id = id;
        this.username = username;
        this.role = role;
        this.token = token;
    }

    // Getter和Setter方法
    public Long getId() { return id; }
    public void setId(Long id) { this.id = id; }
    public String getUsername() { return username; }
    public void setUsername(String username) { this.username = username; }
    public Integer getRole() { return role; }
    public void setRole(Integer role) { this.role = role; }
    public String getToken() { return token; }
    public void setToken(String token) { this.token = token; }
}